import { getChane } from "@/apis/article"
import { useEffect, useState } from "react"
/* eslint-disable @typescript-eslint/no-explicit-any */
export const useChannel = ()=> {
  const [channels, setChannels] = useState([])
  const getChannels = async () => {
    const res = await getChane()
    setChannels(res.data.channels)
  }
  useEffect(() => {
    getChannels()
  }, [])
  
  return channels as any
}